<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
	</head>
	<body>
		<script type="text/javascript">
			console.log(location);
			console.log("主机号："+location.hostname);
			console.log("端口号："+location.port);
			console.log("协议："+location.protocol);
			console.log("相对路径："+location.pathname);
		</script>
	</body>
</html>
